package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.CzEquipmentTypeMapper;
import com.ruoyi.business.domain.CzEquipmentType;
import com.ruoyi.business.service.ICzEquipmentTypeService;

/**
 * 设备类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-01
 */
@Service
public class CzEquipmentTypeServiceImpl implements ICzEquipmentTypeService 
{
    @Autowired
    private CzEquipmentTypeMapper czEquipmentTypeMapper;

    /**
     * 查询设备类型
     * 
     * @param equipmentTypeId 设备类型主键
     * @return 设备类型
     */
    @Override
    public CzEquipmentType selectCzEquipmentTypeByEquipmentTypeId(String equipmentTypeId)
    {
        return czEquipmentTypeMapper.selectCzEquipmentTypeByEquipmentTypeId(equipmentTypeId);
    }

    /**
     * 查询设备类型列表
     * 
     * @param czEquipmentType 设备类型
     * @return 设备类型
     */
    @Override
    public List<CzEquipmentType> selectCzEquipmentTypeList(CzEquipmentType czEquipmentType)
    {
        return czEquipmentTypeMapper.selectCzEquipmentTypeList(czEquipmentType);
    }

    /**
     * 新增设备类型
     * 
     * @param czEquipmentType 设备类型
     * @return 结果
     */
    @Override
    public int insertCzEquipmentType(CzEquipmentType czEquipmentType)
    {
        czEquipmentType.setCreateTime(DateUtils.getNowDate());
        return czEquipmentTypeMapper.insertCzEquipmentType(czEquipmentType);
    }

    /**
     * 修改设备类型
     * 
     * @param czEquipmentType 设备类型
     * @return 结果
     */
    @Override
    public int updateCzEquipmentType(CzEquipmentType czEquipmentType)
    {
        czEquipmentType.setUpdateTime(DateUtils.getNowDate());
        return czEquipmentTypeMapper.updateCzEquipmentType(czEquipmentType);
    }

    /**
     * 批量删除设备类型
     * 
     * @param equipmentTypeIds 需要删除的设备类型主键
     * @return 结果
     */
    @Override
    public int deleteCzEquipmentTypeByEquipmentTypeIds(String[] equipmentTypeIds)
    {
        return czEquipmentTypeMapper.deleteCzEquipmentTypeByEquipmentTypeIds(equipmentTypeIds);
    }

    /**
     * 删除设备类型信息
     * 
     * @param equipmentTypeId 设备类型主键
     * @return 结果
     */
    @Override
    public int deleteCzEquipmentTypeByEquipmentTypeId(String equipmentTypeId)
    {
        return czEquipmentTypeMapper.deleteCzEquipmentTypeByEquipmentTypeId(equipmentTypeId);
    }
}
